package Logic.main;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Scanner;

public class HouseClient {

	private VirtualHouse vh;
	private String response;
	
	private String[] testCommands = {"fa_on", "fa_off", "fa_check", "fa_on", "fa_check", 
			"tmpin_check", "tmpout_check", "tmproof_check", "elcon_check", "elcon_on",
			"fa_ja", "tmpin_ja", "tmpout_ja", "tmproof_ja", 
			
			"buzz_on", "buzz_check", "buzz_off", "buzz_check", "buzz_ja", 
			"wl_on", "wl_check", "wl_off", "wl_check", "wl_ja", 
			"st_on", "st_check", "st_off", "st_check", "st_ja", 
			"heatroof_on", "heatroof_check", "heatroof_off", "heatroof_check", 
			"heatin_on", "heatin_check", "heatin_off", "heatin_check", 
			"fan_on1", "fan_check", "fan_on2", "fan_check", "fan_on3", "fan_check",
			"fan_off", "fan_check", "fan_on3", "fan_on1", "fan_on2", "fan_check",
			"t1_on", "t1_check", "t1_off", "t1_check",
			"t2_on", "t2_check", "t2_off", "t2_check",
			"lghtin_on", "lghtin_check", "lghtin_off", "lghtin_check",
			"lghtout_on", "lghtout_check", "lghtout_off", "lghtout_check",
			"aled_on", "aled_check", "aled_off", "aled_check",
			"sa_on", "sa_check", "sa_off", "sa_check"};
	
	
	public HouseClient() {
		vh = new VirtualHouse();
	}
	
	private void sendCommands() {
		Scanner in = new Scanner(System.in);
		for(String s : testCommands) {
			System.out.println("----------------- \n New command: "+s+"\n Result: "+vh.receiveAndRespond(s+'!'));
			System.out.print("\n ***************\n");
		}
	}
	
	public static void main(String[] args) {
		HouseClient hc = new HouseClient();
		hc.sendCommands();
	}
}
